from core.basehandler import BaseHandler
from core.room import Room
from core.action import Action

class fcc(Room):
    def __init__(self, room_id):
        Room.__init__(self, room_id)    # do basic initialization for every room
        self.fcc_locked = True
        # add inventory items
        #self.add_item(Resume())
        
        # build list of actions
        self.add_action(Exit)
    
    # return description of room.
    def get_description(self):
        if self.fcc_locked:
            desc = "'FCC services are only available for registered MBA students at Boston University.'"
            
        else :
            desc = "'This is the Feld Career Center, this is where your career counselor will help you develop a resume that recruiters will find attractive.'"  
        return desc
    
    # return image of room
    def get_image(self):
        if self.fcc_locked:
            return 'NOFCC.jpg'
        else:
            return 'FCC.jpg'
        
        
class FCCHandler(BaseHandler):
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return fcc

# define actions for this room

class Exit(Action):
    def __init__(self):
        Action.__init__(self, "Exit")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Exit"
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'lobby'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"
